package com.ruoyi.classperformance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.classperformance.mapper.ClassperformanceMapper;
import com.ruoyi.classperformance.domain.Classperformance;
import com.ruoyi.classperformance.service.IClassperformanceService;

/**
 * 学生课堂现记录Service业务层处理
 *
 * @author dongyv
 * @date 2025-05-15
 */
@Service
public class ClassperformanceServiceImpl implements IClassperformanceService
{
    @Autowired
    private ClassperformanceMapper classperformanceMapper;

    /**
     * 查询学生课堂现记录
     *
     * @param performanceId 学生课堂现记录主键
     * @return 学生课堂现记录
     */
    @Override
    public Classperformance selectClassperformanceByPerformanceId(Long performanceId)
    {
        return classperformanceMapper.selectClassperformanceByPerformanceId(performanceId);
    }

    /**
     * 查询学生课堂现记录列表
     *
     * @param classperformance 学生课堂现记录
     * @return 学生课堂现记录
     */
    @Override
    public List<Classperformance> selectClassperformanceList(Classperformance classperformance)
    {
        return classperformanceMapper.selectClassperformanceList(classperformance);
    }

    /**
     * 新增学生课堂现记录
     *
     * @param classperformance 学生课堂现记录
     * @return 结果
     */
    @Override
    public int insertClassperformance(Classperformance classperformance)
    {
        return classperformanceMapper.insertClassperformance(classperformance);
    }

    /**
     * 修改学生课堂现记录
     *
     * @param classperformance 学生课堂现记录
     * @return 结果
     */
    @Override
    public int updateClassperformance(Classperformance classperformance)
    {
        return classperformanceMapper.updateClassperformance(classperformance);
    }

    /**
     * 批量删除学生课堂现记录
     *
     * @param performanceIds 需要删除的学生课堂现记录主键
     * @return 结果
     */
    @Override
    public int deleteClassperformanceByPerformanceIds(Long[] performanceIds)
    {
        return classperformanceMapper.deleteClassperformanceByPerformanceIds(performanceIds);
    }

    /**
     * 删除学生课堂现记录信息
     *
     * @param performanceId 学生课堂现记录主键
     * @return 结果
     */
    @Override
    public int deleteClassperformanceByPerformanceId(Long performanceId)
    {
        return classperformanceMapper.deleteClassperformanceByPerformanceId(performanceId);
    }

    @Override
    public List<Classperformance> selectClassperformanceList_student(String teacherId) {
        return classperformanceMapper.selectClassperformanceList_student(teacherId);
    }
}
